package com.uwo.house.service.serviceImpl;

import com.uwo.house.beans.response.StaffResp;
import com.uwo.house.beans.response.CityResp;
import com.uwo.house.beans.response.DictionaryResp;
import com.uwo.house.beans.response.ProvinceResp;
import com.uwo.house.dao.DictionaryDao;
import com.uwo.house.service.IDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by cyn1c on 2017/7/27.
 */
@Service
public class DictionaryService implements IDictionaryService {
    @Autowired
    public DictionaryDao dictionaryDao;

    public List<DictionaryResp> getDecorationStyleList(String classId){
        return this.dictionaryDao.getDecorationStyleList(classId);
    }

    public List<ProvinceResp> getProvince(){
        return this.dictionaryDao.getProvince();
    }

    public List<CityResp>getCityByParentId(int id){
        return this.dictionaryDao.getCityByParentId(id);
    }

    public List<ProvinceResp> getOpenProvince(){
        return this.dictionaryDao.getOpenProvince();
    }

    public List<CityResp>getOpenCityByParentId(int id){
        return  this.dictionaryDao.getOpenCityByParentId(id);
    }

    public List<StaffResp> getStaffList(int id){
        return this.dictionaryDao.getStaffList(id);
    }

    public CityResp getCityInfoById(Integer id){
        return dictionaryDao.getCityInfoById(id);
    }

    public int openProvince(int id){
        return dictionaryDao.openProvince(id);
    }

    public int openCity(int id) {
        return dictionaryDao.openCity(id);
    }

    public int closeProvince(int id){
        return dictionaryDao.closeProvince(id);
    }

    public int closeCity(int id){
        return dictionaryDao.closeCity(id);
    }
}
